package tec;

class TestEtatPassager{
   
    void lancerTestEtatPassager() {
	int nbTest = 0;
	System.out.print("Test de EtatPasssager:");
	testExterieur();
	System.out.print("."); nbTest++;
	testAssis();
	System.out.print("."); nbTest++;
	testDebout();
	System.out.print("."); nbTest++;
	testInterieur();
	System.out.print("."); nbTest++;
	System.out.println("OK (" + nbTest + ")");
    }


    private static void testExterieur(){
	EtatPassager etatDehors = EtatPassager.DEHORS;
	
	assert etatDehors.estExterieur() == true; 
	assert etatDehors.estAssis() == false;	
	assert etatDehors.estDebout() == false; 
    }
    
    private static void testAssis(){
	EtatPassager etatAssis = EtatPassager.ASSIS;
	
	assert etatAssis.estExterieur() == false : " Fail of testAssis"; 
	assert etatAssis.estAssis() == true :        " Fail of testAssis"; 
	assert etatAssis.estDebout() == false :" Fail of testAssis"; 

    }

    private static void testDebout(){
	EtatPassager etatDebout = EtatPassager.DEBOUT;
	
	assert etatDebout.estExterieur() == false;
	assert etatDebout.estAssis() == false;
	assert etatDebout.estDebout() == true;

    }

    private static void testInterieur(){
	EtatPassager etatDehors = EtatPassager.DEHORS;
	EtatPassager etatAssis = EtatPassager.ASSIS;
	EtatPassager etatDebout = EtatPassager.DEBOUT;
	
	assert etatAssis.estInterieur() == true;
	assert etatDebout.estInterieur() == true;
	assert etatDehors.estInterieur() == false;


    }

}
